/*
*  Copyright 2019-2023 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.domain.vo;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
* @description /
* @author mfc
* @date 2025-01-02
**/
@Data
@TableName("mes_template_config")
public class MesTemplateConfig implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "组件名称")
    private String componentName;

    @ApiModelProperty(value = "标签名称")
    private String tagLabel;

    @ApiModelProperty(value = "标签key")
    private String tagKey;

    @ApiModelProperty(value = "模版名称")
    private String templatePage;

    @ApiModelProperty(value = "模版名称_en")
    private String templatePageEn;

    @ApiModelProperty(value = "组件名称_en")
    private String componentNameEn;

    @ApiModelProperty(value = "控件名称")
    private String controlName;

    @ApiModelProperty(value = "控件名称_en")
    private String controlNameEn;

    @ApiModelProperty(value = "排序_key")
    private String sortKey;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "内容控件名称_key")
    private String contentControlKey;

    @ApiModelProperty(value = "内容控件")
    private String contentControl;

    @ApiModelProperty(value = "内容颜色_key")
    private String contentColorKey;

    @ApiModelProperty(value = "内容颜色")
    private String contentColor;

    @ApiModelProperty(value = "关联表")
    private String fromTable;

    @ApiModelProperty(value = "关联字段")
    private String fromField;

    public void copy(MesTemplateConfig source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
